<% content_for :title do %>Account gegevens<% end %>

  <dl>
    <dt>Uw huidige saldo:</dt>
    <dd><%=format_price @account.balance %></dd>

    <dt>Bestellingen geplaatst:</dt>
    <dd><%=@account.orders.size %> </dd>

    <dt>Inlognaam:</dt>
    <dd><%=h @account.name %></dd>

    <dt>Voornaam:</dt>
    <dd><%=h @account.first_name %></dd>

    <dt>Achternaam:</dt>
    <dd><%=h @account.surname %></dd>

    <dt>E-mailadres:</dt>
    <dd><%=h @account.email %></dd>

    <dt>Geslacht:</dt>
    <dd><%=h @account.gender_female? ? 'Vrouw' : 'Man' %></dd>

    <dt>Geboortedatum:</dt>
    <dd><%=h format_date(@account.date_of_birth) %></dd>
  </dl>

<% @addresses.each do |address|  %>

  <table>
    <tr>
      <th colspan="2"><%=h address.name %></th>
    </tr>
    <tr class="<%=row_class%>">
      <td>Adres:</td>
      <td><%=address.street+" "+address.house_number.to_s%>
        <%if(address.house_number_addition.to_s != "") then%>
          <%="/"+address.house_number_addition%></td>
        <%end%>
    </tr>
    <tr class="<%=row_class%>">
      <td>Postcode:</td>
      <td><%=address.postal_code%></td>
    </tr>
    <tr class="<%=row_class%>">
      <td>Plaats:</td>
      <td><%=address.city%></td>
    </tr>
    <tr class="<%=row_class%>">
      <td>Telefoonnummer:</td>
      <td><%=address.telephone_number%></td>
    </tr>
    <% unless(address.mobile_number.blank?) then%>
      <tr class="<%=row_class%>">
        <td>Mobiel:</td>
        <td><%=address.mobile_number%></td>
      </tr>
    <%end%>
    <%  unless(address.fax_number.blank?) then%>
      <tr class="<%=row_class%>">
        <td>Fax:</td>
        <td><%=address.fax_number%></td>
      </tr>
    <%end%>
    <% unless(address.company.blank?) then%>
      <tr class="<%=row_class%>">
        <td>Bedrijf:</td>
        <td><%=address.company%></td>
      </tr>
    <%end%>
  </table>
<% end %>
  
<%= link_to 'Terug', admin_users_path%>